
function getChartData(url,params){
    var param = params;
    if(!param){
        param= {};
    }
    var result = undefined;
    $.ajax({
        type: "POST",
        contentType: 'application/json',
        dataType: "json",
        url:url,
        cache: false,
        async: false,
        data:JSON.stringify(param),
        success: function (jsonData) {
            result =  jsonData.data;

        }
    });
    return result;
}

function getxBarAxis(data){
    var axis = [];
    data.forEach(function(item,index){
        axis.push(item.name)
    });
    return axis;
}

function getBarData(data){
    var values = [];
    data.forEach(function(item,index){
        values.push(item.value)
    });
    return values;
}